<html>
 <head>
  <title>MVP Log example</title>
 </head>
 <body>

  <h1>Example to show the console consumer.</h1>


  <script type="text/javascript" src="mvp-log-api.js"></script>
  <script type="text/javascript" src="dyndiv.js"></script>
  <script type="text/javascript" src="mvp-log-console.js"></script>

  <form>
   <label for="type">Event-Type</label>
   <select id="type">
    <option>ACTIVITY_NODE_SHOWN</option>
    <option>DAMN_NODE_SHOWN</option>
    <option>DAMN_NODE_ITEM_SHOWN</option>
    <option>DAMN_NODE_ITEM_TRIGGERED</option>
    <option>VPD_TEXT_SHOWN</option>
    <option>MEDICATION_SHOWN</option>
    <option>INTERVIEW_ITEM_SHOWN</option>
    <option>PHYSICAL_EXAM_SHOWN</option>
    <option>DIAGNOSTIC_TEST_SHOWN</option>
    <option>DIAGNOSIS_SHOWN</option>
    <option>INTERVENTION_SHOWN</option>
   </select>
   <br />
   <label for="id">ID</label>
   <input type="text" id="elID" />
   <br />
   <button onclick="fireEvent();return false">Fire event</button>
   <br />
   <br />
   <button onclick="document.getElementById ('type').selectedIndex = 0; var id = document.getElementById ('elID'); id.value = 'Slide #1';fireEvent (); id.value = 'Slide #2';fireEvent (); id.value = 'Slide #3';fireEvent (); id.value = 'Slide #2';fireEvent (); id.value = 'Slide #3';fireEvent (); id.value = 'Slide #1';fireEvent ();return false">ActivityNode-Demo</button>
  </form>

  <script type="text/javascript">
   fireEvent = function () {
    try {
     medbiq.mvp.log.fireSpecEvent ({
      type: medbiq.mvp.log.Type[document.getElementById ('type').options[document.getElementById ('type').selectedIndex].text],
      elementID: document.getElementById ('elID').value,
      userID: 'dummy'
      });
     } catch (ex) { alert (ex); }
    }
  </script>



 </body>
</html>